<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp" %>
<!DOCTYPE html>
	<html lang="zh-CN">
	<head>
		<title>朝代更新 - 用户中心</title>
		<%@ include file="/common/include/title.jsp" %>
	</head>
	<body>
		<%@ include file="/common/include/header.jsp" %>
		<div class="container">
			<div class="row">
				<div class="col-sm-8 col-sm-offset-1 main">
					<h2
						class="col-sm-10 col-sm-offset-1 form-signin-heading text-center">朝代更新</h2>
					<!-- 
						表单中的名称name请求体中的键,和pojo的属性一样
					 -->
					<form id="form" class="form-horizontal" method="post"
						action="${rootPath }/head/demo/dynastyUpdateSubmit.htm">
						<input type="hidden" name="id" value="${requestScope.demoDynasty.id }">
						
						<div class="form-group">
							<label for="email" class="col-sm-2 control-label">名称:</label>
							<div class="col-sm-8">
								<input type="text" id="name" name="name" value="${requestScope.demoDynasty.name }"
									class="form-control" placeholder="名称">
							</div>
						</div>
						<div class="form-group">
							<label for="email" class="col-sm-2 control-label">开国时间:</label>
							<div class="col-sm-8">
								<input type="text" id="stYear" name="stYear" value="${requestScope.demoDynasty.stYear }"
									class="form-control" placeholder="开国时间">
							</div>
						</div>
						<div class="form-group">
							<label for="email" class="col-sm-2 control-label">亡国时间:</label>
							<div class="col-sm-8">
								<input type="text" id="edYear" name="edYear" value="${requestScope.demoDynasty.edYear }"
									class="form-control" placeholder="亡国时间">
							</div>
						</div>
						<div class="form-group">
							<label for="email" class="col-sm-2 control-label">发布时间:</label>
							<div class="col-sm-8">
								<c:if test="${requestScope.demoDynasty.pubTime != null }">
									<c:set value="${requestScope.demoDynasty.pubTime }" var="sys_now"/>
								</c:if>
								<input type="text" id="pubTimeStr" name="pubTimeStr" value="<fmt:formatDate value="${sys_now }" pattern="yyyy-MM-dd HH:mm:ss" />"
									onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" 
									class="form-control " placeholder="发布时间">
							</div>
						</div>
						<div class="form-group">
							<label for="email" class="col-sm-2 control-label">首都:</label>
							<div class="col-sm-8">
								<input type="text" id="capital" name="capital" value="${requestScope.demoDynasty.capital }"
									class="form-control" placeholder="首都">
							</div>
						</div>
						<div class="form-group form-check">
							<label for="multiSel">状态:</label>
							<div class="col-sm-8 form-check">
								<label class="form-check-label">
									<input type="radio" class="form-check-input" name="status" value="1" ${requestScope.demoDynasty.status == '1' ? 'checked' : '' }>
									启用
								</label>
								&nbsp;&nbsp;&nbsp;
								<label class="form-check-label">
									<input type="radio" class="form-check-input" name="status" value="0" ${requestScope.demoDynasty.status == '0' ? 'checked' : '' }>
									禁用
								</label>
							</div>
						</div>
						<div class="form-group">
							<label for="address" class="col-sm-2 control-label">描述:</label>
							<div class="col-sm-8">
								<textarea rows="5" cols="80" id="content" name="content"
									class="form-control">${requestScope.demoDynasty.content }</textarea>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-8 col-sm-offset-2">
								<button class="btn btn-lg btn-primary" type="submit">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	
		<%@ include file="/common/include/footer.jsp" %>
	</body>
</html>